home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Pascal / Libraries / GrafSys 2.0 / GrafSys 2.0 source / GrafSysCoreAux.p < prev    next >
Encoding:
Text File  |  1993-06-07  |  1.0 KB  |  61 lines  |  [TEXT/PJMM]

  1. unit GrafSysCoreAux;
  2. {this unit holds implementation of various object procedures that are not as }
  3. {important as the core itself. }
  4.  
  5.  
  6. interface
  7.  
  8.     uses
  9.         Matrix, Transformations, GrafSysCore;
  10.  
  11. implementation
  12.  
  13.     procedure TPoint3D.SetKoords (Koordinates: Vector4);
  14.     begin
  15.         Koord := Koordinates;
  16.     end;
  17.  
  18.     function TPoint3D.GetKoords: Vector4;
  19.     begin
  20.         GetKoords := VMult(Koord, xForm)
  21.     end;
  22.  
  23.     procedure TPoint3D.Init;
  24.     begin
  25.         inherited Init;
  26.         SetVector4(Koord, 0, 0, 0);
  27.     end;
  28.  
  29.     procedure TPoint3D.Reset;
  30.     begin
  31.         inherited Reset;
  32.         SetVector4(Koord, 0, 0, 0);
  33.     end;
  34.  
  35.     procedure TLine3D.Init;
  36.     begin
  37.         inherited Init;
  38.         SetVector4(FromLoc, 0, 0, 0);
  39.         SetVector4(toLoc, 0, 0, 0);
  40.     end;
  41.  
  42.     procedure TLine3D.Reset;
  43.     begin
  44.         inherited Reset;
  45.         SetVector4(FromLoc, 0, 0, 0);
  46.         SetVector4(toLoc, 0, 0, 0);
  47.     end;
  48.  
  49.     procedure TLine3D.SetKoords (K1, K2: Vector4);
  50.     begin
  51.         FromLoc := K1;
  52.         ToLoc := K2;
  53.     end;
  54.  
  55.     procedure TLine3D.GetKoords (var K1, K2: Vector4);
  56.     begin
  57.         K1 := VMult(FromLoc, xForm);
  58.         K2 := VMult(ToLoc, xForm);
  59.     end;
  60.  
  61. end.